package hw827640.lesson1;

// 1.1--100
public class Test{
	public static void main(String args []){
		
		System.out.println( "*****for方法实现*****" );
		for (int i=1;i<=100;i++){
			
			System.out.println(i);
		}
		
		TestWhile();
		TestDoWhile();
		TestBreak();
		
	}
	
	
	public static void TestWhile() {
		int j=1;
		System.out.println( "*****while方法实现*****" );
		while(j<=100){
			
			System.out.println(j);
			j++;
			
		}
		
	}
	
	public static void TestDoWhile(){
		System.out.println("*****用do while 实现");
		
		int k=1;
		do{
			
			System.out.println(k);
			k++;
		}while(k<=100);
	}
	
	//2.
	
	public static void TestBreak(){
		System.out.println("*****test 2 *****");
		
				for (int i=1;i<=100;i++){
					System.out.println(i);
			if (i == 47){
				break;
			}
			
		}
	}
}










